package com.zzyl.mapper;

import com.zzyl.dto.DeviceDto;
import com.zzyl.entity.Device;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface DeviceMapper {

    /**
     * 查询姓名是否被使用
     * @param deviceName
     * @return
     */
    @Select("SELECT COUNT(*) FROM device WHERE device_name = #{deviceName}")
    Integer countName(String deviceName);

    /**
     * 插入设备数据
     * @param device
     */
    void insert(Device device);
}
